package com.cheyun.netsalev3.repository

import com.cheyun.netsalev3.bean.basedata.BaseDataParam
import com.cheyun.netsalev3.bean.basedata.MemberGroup2
import com.cheyun.netsalev3.utils.MySharedPreferences
import com.cheyun.netsalev3.utils.api.ApiCallback
import com.cheyun.netsalev3.utils.api.ApiClient
import com.cheyun.netsalev3.utils.api.ApiException
import com.cheyun.netsalev3.utils.api.BaseResp
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers
import kotlin.reflect.KFunction1


class FilterActivityRepository() {
    /**
     * 获取用户组
     */
    fun getMemberGroup(kFunction0: KFunction1<@ParameterName(name = "list") ArrayList<MemberGroup2>, Unit>) {
//        ApiClient.getInstance().getMemberGroup()
//                .subscribeOn(Schedulers.io())
//                .subscribeOn(AndroidSchedulers.mainThread())
//                .subscribe(object : ApiCallback<BaseResp<ArrayList<MemberGroup2>>>() {
//                    override fun onSuccess(t: BaseResp<ArrayList<MemberGroup2>>) {
//                        t.data?.apply {
//                            kFunction0(this)
//                        }
//                    }
//
//                    override fun onError(ex: ApiException) {
//
//                    }
//
//
//                })

    }
}
